import { IPSAppCodeList } from './ipsapp-code-list';
import { IPSAppDEDataSet } from '../dataentity/ipsapp-dedata-set';
import { IPSAppDEField } from '../dataentity/ipsapp-defield';
import { IPSAppDataEntity } from '../dataentity/ipsapp-data-entity';
import { IPSCodeItem } from '../../codelist/ipscode-item';
import { IPSDataEntity } from '../../dataentity/ipsdata-entity';
import { IPSDEField } from '../../dataentity/defield/ipsdefield';
import { IPSDEDataSet } from '../../dataentity/ds/ipsdedata-set';
import { IPSLanguageRes } from '../../res/ipslanguage-res';
import { IPSSysPFPlugin } from '../../res/ipssys-pfplugin';
import { IPSSysSFPlugin } from '../../res/ipssys-sfplugin';
import { IPSSystemModule } from '../../system/ipssystem-module';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSAppCodeListImpl extends PSModelObjectImpl implements IPSAppCodeList {
  protected beginvaluepsappdefield: IPSAppDEField | null = null;

  getBeginValuePSAppDEField(): IPSAppDEField | null {
    if (this.beginvaluepsappdefield != null) return this.beginvaluepsappdefield;
    const value = this.M.getBeginValuePSAppDEField;
    if (value == null) {
      return null;
    }
    this.beginvaluepsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getBeginValuePSAppDEField') as IPSAppDEField;
    return this.beginvaluepsappdefield;
  }

  get beginValuePSAppDEField(): IPSAppDEField | null {
    return this.getBeginValuePSAppDEField();
  }

  getBeginValuePSAppDEFieldMust(): IPSAppDEField {
    const value = this.getBeginValuePSAppDEField();
    if (value == null) {
      throw new Error('未指定开始值应用实体属性');
    }
    return value;
  }

  protected beginvaluepsdefield: IPSDEField | null = null;

  getBeginValuePSDEField(): IPSDEField | null {
    if (this.beginvaluepsdefield != null) return this.beginvaluepsdefield;
    const value = this.M.getBeginValuePSDEField;
    if (value == null) {
      return null;
    }
    const ipsdataentity = this.getPSDataEntity();
    if (ipsdataentity != null) {
      this.beginvaluepsdefield = ipsdataentity.findPSDEField(value);
    }
    return this.beginvaluepsdefield;
  }

  get beginValuePSDEField(): IPSDEField | null {
    return this.getBeginValuePSDEField();
  }

  getBeginValuePSDEFieldMust(): IPSDEField {
    const value = this.getBeginValuePSDEField();
    if (value == null) {
      throw new Error('未指定开始值属性');
    }
    return value;
  }

  get cacheTimeout(): number {
    return this.M.cacheTimeout != null ? this.M.cacheTimeout : -1;
  }

  get codeListTag(): string {
    return this.M.codeListTag;
  }

  get codeListType(): 'STATIC' | 'DYNAMIC' | 'PREDEFINED' {
    return this.M.codeListType;
  }

  get codeName(): string {
    return this.M.codeName;
  }

  get customCond(): string {
    return this.M.customCond;
  }

  protected datapsappdefield: IPSAppDEField | null = null;

  getDataPSAppDEField(): IPSAppDEField | null {
    if (this.datapsappdefield != null) return this.datapsappdefield;
    const value = this.M.getDataPSAppDEField;
    if (value == null) {
      return null;
    }
    this.datapsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getDataPSAppDEField') as IPSAppDEField;
    return this.datapsappdefield;
  }

  get dataPSAppDEField(): IPSAppDEField | null {
    return this.getDataPSAppDEField();
  }

  getDataPSAppDEFieldMust(): IPSAppDEField {
    const value = this.getDataPSAppDEField();
    if (value == null) {
      throw new Error('未指定数据应用实体属性');
    }
    return value;
  }

  protected datapsdefield: IPSDEField | null = null;

  getDataPSDEField(): IPSDEField | null {
    if (this.datapsdefield != null) return this.datapsdefield;
    const value = this.M.getDataPSDEField;
    if (value == null) {
      return null;
    }
    this.datapsdefield = this.getPSModel4('dataentity.defield.IPSDEField', value, 'getDataPSDEField') as IPSDEField;
    return this.datapsdefield;
  }

  get dataPSDEField(): IPSDEField | null {
    return this.getDataPSDEField();
  }

  getDataPSDEFieldMust(): IPSDEField {
    const value = this.getDataPSDEField();
    if (value == null) {
      throw new Error('未指定数据属性');
    }
    return value;
  }

  protected disablepsappdefield: IPSAppDEField | null = null;

  getDisablePSAppDEField(): IPSAppDEField | null {
    if (this.disablepsappdefield != null) return this.disablepsappdefield;
    const value = this.M.getDisablePSAppDEField;
    if (value == null) {
      return null;
    }
    this.disablepsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getDisablePSAppDEField') as IPSAppDEField;
    return this.disablepsappdefield;
  }

  get disablePSAppDEField(): IPSAppDEField | null {
    return this.getDisablePSAppDEField();
  }

  getDisablePSAppDEFieldMust(): IPSAppDEField {
    const value = this.getDisablePSAppDEField();
    if (value == null) {
      throw new Error('未指定禁用标志应用实体属性');
    }
    return value;
  }

  protected disablepsdefield: IPSDEField | null = null;

  getDisablePSDEField(): IPSDEField | null {
    if (this.disablepsdefield != null) return this.disablepsdefield;
    const value = this.M.getDisablePSDEField;
    if (value == null) {
      return null;
    }
    this.disablepsdefield = this.getPSModel4('dataentity.defield.IPSDEField', value, 'getDisablePSDEField') as IPSDEField;
    return this.disablepsdefield;
  }

  get disablePSDEField(): IPSDEField | null {
    return this.getDisablePSDEField();
  }

  getDisablePSDEFieldMust(): IPSDEField {
    const value = this.getDisablePSDEField();
    if (value == null) {
      throw new Error('未指定禁用值属性');
    }
    return value;
  }

  get dynaInstMode(): 0 | 1 | 2 {
    return this.M.dynaInstMode;
  }

  get dynaInstTag(): string {
    return this.M.dynaInstTag;
  }

  get dynaInstTag2(): string {
    return this.M.dynaInstTag2;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get emptyText(): string {
    return this.M.emptyText;
  }

  protected emptytextpslanguageres: IPSLanguageRes | null = null;

  getEmptyTextPSLanguageRes(): IPSLanguageRes | null {
    if (this.emptytextpslanguageres != null) return this.emptytextpslanguageres;
    const value = this.M.getEmptyTextPSLanguageRes;
    if (value == null) {
      return null;
    }
    this.emptytextpslanguageres = this.getPSModel4('res.IPSLanguageRes', value, 'getEmptyTextPSLanguageRes') as IPSLanguageRes;
    return this.emptytextpslanguageres;
  }

  get emptyTextPSLanguageRes(): IPSLanguageRes | null {
    return this.getEmptyTextPSLanguageRes();
  }

  getEmptyTextPSLanguageResMust(): IPSLanguageRes {
    const value = this.getEmptyTextPSLanguageRes();
    if (value == null) {
      throw new Error('未指定空白显示文本语言资源');
    }
    return value;
  }

  protected endvaluepsappdefield: IPSAppDEField | null = null;

  getEndValuePSAppDEField(): IPSAppDEField | null {
    if (this.endvaluepsappdefield != null) return this.endvaluepsappdefield;
    const value = this.M.getEndValuePSAppDEField;
    if (value == null) {
      return null;
    }
    this.endvaluepsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getEndValuePSAppDEField') as IPSAppDEField;
    return this.endvaluepsappdefield;
  }

  get endValuePSAppDEField(): IPSAppDEField | null {
    return this.getEndValuePSAppDEField();
  }

  getEndValuePSAppDEFieldMust(): IPSAppDEField {
    const value = this.getEndValuePSAppDEField();
    if (value == null) {
      throw new Error('未指定结束值应用实体属性');
    }
    return value;
  }

  protected endvaluepsdefield: IPSDEField | null = null;

  getEndValuePSDEField(): IPSDEField | null {
    if (this.endvaluepsdefield != null) return this.endvaluepsdefield;
    const value = this.M.getEndValuePSDEField;
    if (value == null) {
      return null;
    }
    const ipsdataentity = this.getPSDataEntity();
    if (ipsdataentity != null) {
      this.endvaluepsdefield = ipsdataentity.findPSDEField(value);
    }
    return this.endvaluepsdefield;
  }

  get endValuePSDEField(): IPSDEField | null {
    return this.getEndValuePSDEField();
  }

  getEndValuePSDEFieldMust(): IPSDEField {
    const value = this.getEndValuePSDEField();
    if (value == null) {
      throw new Error('未指定结束值属性');
    }
    return value;
  }

  protected iconclspsappdefield: IPSAppDEField | null = null;

  getIconClsPSAppDEField(): IPSAppDEField | null {
    if (this.iconclspsappdefield != null) return this.iconclspsappdefield;
    const value = this.M.getIconClsPSAppDEField;
    if (value == null) {
      return null;
    }
    this.iconclspsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getIconClsPSAppDEField') as IPSAppDEField;
    return this.iconclspsappdefield;
  }

  get iconClsPSAppDEField(): IPSAppDEField | null {
    return this.getIconClsPSAppDEField();
  }

  getIconClsPSAppDEFieldMust(): IPSAppDEField {
    const value = this.getIconClsPSAppDEField();
    if (value == null) {
      throw new Error('未指定图标样式应用实体属性');
    }
    return value;
  }

  protected iconclspsdefield: IPSDEField | null = null;

  getIconClsPSDEField(): IPSDEField | null {
    if (this.iconclspsdefield != null) return this.iconclspsdefield;
    const value = this.M.getIconClsPSDEField;
    if (value == null) {
      return null;
    }
    this.iconclspsdefield = this.getPSModel4('dataentity.defield.IPSDEField', value, 'getIconClsPSDEField') as IPSDEField;
    return this.iconclspsdefield;
  }

  get iconClsPSDEField(): IPSDEField | null {
    return this.getIconClsPSDEField();
  }

  getIconClsPSDEFieldMust(): IPSDEField {
    const value = this.getIconClsPSDEField();
    if (value == null) {
      throw new Error('未指定图标样式属性');
    }
    return value;
  }

  protected iconclsxpsappdefield: IPSAppDEField | null = null;

  getIconClsXPSAppDEField(): IPSAppDEField | null {
    if (this.iconclsxpsappdefield != null) return this.iconclsxpsappdefield;
    const value = this.M.getIconClsXPSAppDEField;
    if (value == null) {
      return null;
    }
    this.iconclsxpsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getIconClsXPSAppDEField') as IPSAppDEField;
    return this.iconclsxpsappdefield;
  }

  get iconClsXPSAppDEField(): IPSAppDEField | null {
    return this.getIconClsXPSAppDEField();
  }

  getIconClsXPSAppDEFieldMust(): IPSAppDEField {
    const value = this.getIconClsXPSAppDEField();
    if (value == null) {
      throw new Error('未指定图标样式（倍数）应用实体属性');
    }
    return value;
  }

  protected iconclsxpsdefield: IPSDEField | null = null;

  getIconClsXPSDEField(): IPSDEField | null {
    if (this.iconclsxpsdefield != null) return this.iconclsxpsdefield;
    const value = this.M.getIconClsXPSDEField;
    if (value == null) {
      return null;
    }
    this.iconclsxpsdefield = this.getPSModel4('dataentity.defield.IPSDEField', value, 'getIconClsXPSDEField') as IPSDEField;
    return this.iconclsxpsdefield;
  }

  get iconClsXPSDEField(): IPSDEField | null {
    return this.getIconClsXPSDEField();
  }

  getIconClsXPSDEFieldMust(): IPSDEField {
    const value = this.getIconClsXPSDEField();
    if (value == null) {
      throw new Error('未指定图标样式(x)属性');
    }
    return value;
  }

  protected iconpathpsappdefield: IPSAppDEField | null = null;

  getIconPathPSAppDEField(): IPSAppDEField | null {
    if (this.iconpathpsappdefield != null) return this.iconpathpsappdefield;
    const value = this.M.getIconPathPSAppDEField;
    if (value == null) {
      return null;
    }
    this.iconpathpsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getIconPathPSAppDEField') as IPSAppDEField;
    return this.iconpathpsappdefield;
  }

  get iconPathPSAppDEField(): IPSAppDEField | null {
    return this.getIconPathPSAppDEField();
  }

  getIconPathPSAppDEFieldMust(): IPSAppDEField {
    const value = this.getIconPathPSAppDEField();
    if (value == null) {
      throw new Error('未指定图标路径应用实体属性');
    }
    return value;
  }

  protected iconpathxpsappdefield: IPSAppDEField | null = null;

  getIconPathXPSAppDEField(): IPSAppDEField | null {
    if (this.iconpathxpsappdefield != null) return this.iconpathxpsappdefield;
    const value = this.M.getIconPathXPSAppDEField;
    if (value == null) {
      return null;
    }
    this.iconpathxpsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getIconPathXPSAppDEField') as IPSAppDEField;
    return this.iconpathxpsappdefield;
  }

  get iconPathXPSAppDEField(): IPSAppDEField | null {
    return this.getIconPathXPSAppDEField();
  }

  getIconPathXPSAppDEFieldMust(): IPSAppDEField {
    const value = this.getIconPathXPSAppDEField();
    if (value == null) {
      throw new Error('未指定图标路径（倍数）应用实体属性');
    }
    return value;
  }

  protected iconpathxpsdefield: IPSDEField | null = null;

  getIconPathXPSDEField(): IPSDEField | null {
    if (this.iconpathxpsdefield != null) return this.iconpathxpsdefield;
    const value = this.M.getIconPathXPSDEField;
    if (value == null) {
      return null;
    }
    this.iconpathxpsdefield = this.getPSModel4('dataentity.defield.IPSDEField', value, 'getIconPathXPSDEField') as IPSDEField;
    return this.iconpathxpsdefield;
  }

  get iconPathXPSDEField(): IPSDEField | null {
    return this.getIconPathXPSDEField();
  }

  getIconPathXPSDEFieldMust(): IPSDEField {
    const value = this.getIconPathXPSDEField();
    if (value == null) {
      throw new Error('未指定图标路径(x)属性');
    }
    return value;
  }

  get incBeginValueMode(): 0 | 1 | 2 | 3 {
    return this.M.incBeginValueMode != null ? this.M.incBeginValueMode : 0;
  }

  get incEndValueMode(): 0 | 1 | 2 | 3 {
    return this.M.incEndValueMode != null ? this.M.incEndValueMode : 0;
  }

  get memo(): string {
    return this.M.memo;
  }

  get minorSortDir(): 'ASC' | 'DESC' {
    return this.M.minorSortDir;
  }

  protected minorsortpsappdefield: IPSAppDEField | null = null;

  getMinorSortPSAppDEField(): IPSAppDEField | null {
    if (this.minorsortpsappdefield != null) return this.minorsortpsappdefield;
    const value = this.M.getMinorSortPSAppDEField;
    if (value == null) {
      return null;
    }
    this.minorsortpsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getMinorSortPSAppDEField') as IPSAppDEField;
    return this.minorsortpsappdefield;
  }

  get minorSortPSAppDEField(): IPSAppDEField | null {
    return this.getMinorSortPSAppDEField();
  }

  getMinorSortPSAppDEFieldMust(): IPSAppDEField {
    const value = this.getMinorSortPSAppDEField();
    if (value == null) {
      throw new Error('未指定排序应用实体属性');
    }
    return value;
  }

  protected minorsortpsdefield: IPSDEField | null = null;

  getMinorSortPSDEField(): IPSDEField | null {
    if (this.minorsortpsdefield != null) return this.minorsortpsdefield;
    const value = this.M.getMinorSortPSDEField;
    if (value == null) {
      return null;
    }
    this.minorsortpsdefield = this.getPSModel4('dataentity.defield.IPSDEField', value, 'getMinorSortPSDEField') as IPSDEField;
    return this.minorsortpsdefield;
  }

  get minorSortPSDEField(): IPSDEField | null {
    return this.getMinorSortPSDEField();
  }

  getMinorSortPSDEFieldMust(): IPSDEField {
    const value = this.getMinorSortPSDEField();
    if (value == null) {
      throw new Error('未指定默认排序属性');
    }
    return value;
  }

  get name(): string {
    return this.M.name;
  }

  get orMode(): 'NUMBERORMODE' | 'STRINGORMODE' {
    return this.M.orMode;
  }

  get orderValue(): number {
    return this.M.orderValue != null ? this.M.orderValue : 99999;
  }

  protected psappdedataset: IPSAppDEDataSet | null = null;

  getPSAppDEDataSet(): IPSAppDEDataSet | null {
    if (this.psappdedataset != null) return this.psappdedataset;
    const value = this.M.getPSAppDEDataSet;
    if (value == null) {
      return null;
    }
    const ipsappdataentity = this.getPSAppDataEntity();
    if (ipsappdataentity != null) {
      this.psappdedataset = ipsappdataentity.findPSAppDEDataSet(value);
    }
    return this.psappdedataset;
  }

  get psAppDEDataSet(): IPSAppDEDataSet | null {
    return this.getPSAppDEDataSet();
  }

  getPSAppDEDataSetMust(): IPSAppDEDataSet {
    const value = this.getPSAppDEDataSet();
    if (value == null) {
      throw new Error('未指定应用实体数据集合');
    }
    return value;
  }

  protected psappdataentity: IPSAppDataEntity | null = null;

  getPSAppDataEntity(): IPSAppDataEntity | null {
    if (this.psappdataentity != null) return this.psappdataentity;
    const value = this.M.getPSAppDataEntity;
    if (value == null) {
      return null;
    }
    this.psappdataentity = this.getPSModel4('app.dataentity.IPSAppDataEntity', value, 'getPSAppDataEntity') as IPSAppDataEntity;
    return this.psappdataentity;
  }

  get psAppDataEntity(): IPSAppDataEntity | null {
    return this.getPSAppDataEntity();
  }

  getPSAppDataEntityMust(): IPSAppDataEntity {
    const value = this.getPSAppDataEntity();
    if (value == null) {
      throw new Error('未指定应用实体');
    }
    return value;
  }

  protected pscodeitems: IPSCodeItem[] | null = null;

  getPSCodeItems(): IPSCodeItem[] | null {
    if (this.pscodeitems == null) {
      this.pscodeitems = this.fillChildListModel(this.M.getPSCodeItems, 'codelist.IPSCodeItem') as IPSCodeItem[];
    }
    return this.pscodeitems;
  }

  get psCodeItems(): IPSCodeItem[] | null {
    return this.getPSCodeItems();
  }

  findPSCodeItem(objKey: any): IPSCodeItem | null {
    return this.getPSModel5('codelist.IPSCodeItem', this.getPSCodeItems(), objKey) as IPSCodeItem;
  }

  get psCodeListTemplId(): string {
    return this.M.getPSCodeListTemplId;
  }

  getPSCodeListTemplId(): string {
    return this.M.getPSCodeListTemplId;
  }

  protected psdedataset: IPSDEDataSet | null = null;

  getPSDEDataSet(): IPSDEDataSet | null {
    if (this.psdedataset != null) return this.psdedataset;
    const value = this.M.getPSDEDataSet;
    if (value == null) {
      return null;
    }
    this.psdedataset = this.getPSModel4('dataentity.ds.IPSDEDataSet', value, 'getPSDEDataSet') as IPSDEDataSet;
    return this.psdedataset;
  }

  get psDEDataSet(): IPSDEDataSet | null {
    return this.getPSDEDataSet();
  }

  getPSDEDataSetMust(): IPSDEDataSet {
    const value = this.getPSDEDataSet();
    if (value == null) {
      throw new Error('未指定实体数据集对象');
    }
    return value;
  }

  protected psdataentity: IPSDataEntity | null = null;

  getPSDataEntity(): IPSDataEntity | null {
    if (this.psdataentity != null) return this.psdataentity;
    const value = this.M.getPSDataEntity;
    if (value == null) {
      return null;
    }
    this.psdataentity = this.getPSModel4('dataentity.IPSDataEntity', value, 'getPSDataEntity') as IPSDataEntity;
    return this.psdataentity;
  }

  get psDataEntity(): IPSDataEntity | null {
    return this.getPSDataEntity();
  }

  getPSDataEntityMust(): IPSDataEntity {
    const value = this.getPSDataEntity();
    if (value == null) {
      throw new Error('未指定实体对象');
    }
    return value;
  }

  protected pssyspfplugin: IPSSysPFPlugin | null = null;

  getPSSysPFPlugin(): IPSSysPFPlugin | null {
    if (this.pssyspfplugin != null) return this.pssyspfplugin;
    const value = this.M.getPSSysPFPlugin;
    if (value == null) {
      return null;
    }
    this.pssyspfplugin = this.getPSModel4('res.IPSSysPFPlugin', value, 'getPSSysPFPlugin') as IPSSysPFPlugin;
    return this.pssyspfplugin;
  }

  get psSysPFPlugin(): IPSSysPFPlugin | null {
    return this.getPSSysPFPlugin();
  }

  getPSSysPFPluginMust(): IPSSysPFPlugin {
    const value = this.getPSSysPFPlugin();
    if (value == null) {
      throw new Error('未指定前端扩展插件');
    }
    return value;
  }

  protected pssyssfplugin: IPSSysSFPlugin | null = null;

  getPSSysSFPlugin(): IPSSysSFPlugin | null {
    if (this.pssyssfplugin != null) return this.pssyssfplugin;
    const value = this.M.getPSSysSFPlugin;
    if (value == null) {
      return null;
    }
    this.pssyssfplugin = this.getPSModel4('res.IPSSysSFPlugin', value, 'getPSSysSFPlugin') as IPSSysSFPlugin;
    return this.pssyssfplugin;
  }

  get psSysSFPlugin(): IPSSysSFPlugin | null {
    return this.getPSSysSFPlugin();
  }

  getPSSysSFPluginMust(): IPSSysSFPlugin {
    const value = this.getPSSysSFPlugin();
    if (value == null) {
      throw new Error('未指定后台扩展插件');
    }
    return value;
  }

  protected pssystemmodule: IPSSystemModule | null = null;

  getPSSystemModule(): IPSSystemModule | null {
    if (this.pssystemmodule != null) return this.pssystemmodule;
    const value = this.M.getPSSystemModule;
    if (value == null) {
      return null;
    }
    this.pssystemmodule = this.getPSModel4('system.IPSSystemModule', value, 'getPSSystemModule') as IPSSystemModule;
    return this.pssystemmodule;
  }

  get psSystemModule(): IPSSystemModule | null {
    return this.getPSSystemModule();
  }

  getPSSystemModuleMust(): IPSSystemModule {
    const value = this.getPSSystemModule();
    if (value == null) {
      throw new Error('未指定系统模块');
    }
    return value;
  }

  protected pvaluepsappdefield: IPSAppDEField | null = null;

  getPValuePSAppDEField(): IPSAppDEField | null {
    if (this.pvaluepsappdefield != null) return this.pvaluepsappdefield;
    const value = this.M.getPValuePSAppDEField;
    if (value == null) {
      return null;
    }
    this.pvaluepsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getPValuePSAppDEField') as IPSAppDEField;
    return this.pvaluepsappdefield;
  }

  get pValuePSAppDEField(): IPSAppDEField | null {
    return this.getPValuePSAppDEField();
  }

  getPValuePSAppDEFieldMust(): IPSAppDEField {
    const value = this.getPValuePSAppDEField();
    if (value == null) {
      throw new Error('未指定父值应用实体属性');
    }
    return value;
  }

  protected pvaluepsdefield: IPSDEField | null = null;

  getPValuePSDEField(): IPSDEField | null {
    if (this.pvaluepsdefield != null) return this.pvaluepsdefield;
    const value = this.M.getPValuePSDEField;
    if (value == null) {
      return null;
    }
    this.pvaluepsdefield = this.getPSModel4('dataentity.defield.IPSDEField', value, 'getPValuePSDEField') as IPSDEField;
    return this.pvaluepsdefield;
  }

  get pValuePSDEField(): IPSDEField | null {
    return this.getPValuePSDEField();
  }

  getPValuePSDEFieldMust(): IPSDEField {
    const value = this.getPValuePSDEField();
    if (value == null) {
      throw new Error('未指定父值属性');
    }
    return value;
  }

  get predefinedType(): 'OPERATOR' | 'RUNTIME' | 'MODULEINST' | 'DEMAINSTATE' | 'USER' | 'USER2' | 'USER3' | 'USER4' {
    return this.M.predefinedType;
  }

  get refFlag(): boolean {
    return this.M.refFlag;
  }

  get systemTag(): string {
    return this.M.systemTag;
  }

  protected textpsappdefield: IPSAppDEField | null = null;

  getTextPSAppDEField(): IPSAppDEField | null {
    if (this.textpsappdefield != null) return this.textpsappdefield;
    const value = this.M.getTextPSAppDEField;
    if (value == null) {
      return null;
    }
    this.textpsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getTextPSAppDEField') as IPSAppDEField;
    return this.textpsappdefield;
  }

  get textPSAppDEField(): IPSAppDEField | null {
    return this.getTextPSAppDEField();
  }

  getTextPSAppDEFieldMust(): IPSAppDEField {
    const value = this.getTextPSAppDEField();
    if (value == null) {
      throw new Error('未指定文本应用实体属性');
    }
    return value;
  }

  protected textpsdefield: IPSDEField | null = null;

  getTextPSDEField(): IPSDEField | null {
    if (this.textpsdefield != null) return this.textpsdefield;
    const value = this.M.getTextPSDEField;
    if (value == null) {
      return null;
    }
    this.textpsdefield = this.getPSModel4('dataentity.defield.IPSDEField', value, 'getTextPSDEField') as IPSDEField;
    return this.textpsdefield;
  }

  get textPSDEField(): IPSDEField | null {
    return this.getTextPSDEField();
  }

  getTextPSDEFieldMust(): IPSDEField {
    const value = this.getTextPSDEField();
    if (value == null) {
      throw new Error('未指定显示文本属性');
    }
    return value;
  }

  get textSeparator(): string {
    return this.M.textSeparator;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userData(): string {
    return this.M.userData;
  }

  get userData2(): string {
    return this.M.userData2;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  protected valuepsappdefield: IPSAppDEField | null = null;

  getValuePSAppDEField(): IPSAppDEField | null {
    if (this.valuepsappdefield != null) return this.valuepsappdefield;
    const value = this.M.getValuePSAppDEField;
    if (value == null) {
      return null;
    }
    this.valuepsappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getValuePSAppDEField') as IPSAppDEField;
    return this.valuepsappdefield;
  }

  get valuePSAppDEField(): IPSAppDEField | null {
    return this.getValuePSAppDEField();
  }

  getValuePSAppDEFieldMust(): IPSAppDEField {
    const value = this.getValuePSAppDEField();
    if (value == null) {
      throw new Error('未指定值应用实体属性');
    }
    return value;
  }

  protected valuepsdefield: IPSDEField | null = null;

  getValuePSDEField(): IPSDEField | null {
    if (this.valuepsdefield != null) return this.valuepsdefield;
    const value = this.M.getValuePSDEField;
    if (value == null) {
      return null;
    }
    this.valuepsdefield = this.getPSModel4('dataentity.defield.IPSDEField', value, 'getValuePSDEField') as IPSDEField;
    return this.valuepsdefield;
  }

  get valuePSDEField(): IPSDEField | null {
    return this.getValuePSDEField();
  }

  getValuePSDEFieldMust(): IPSDEField {
    const value = this.getValuePSDEField();
    if (value == null) {
      throw new Error('未指定值属性');
    }
    return value;
  }

  get valueSeparator(): string {
    return this.M.valueSeparator;
  }

  get codeItemValueNumber(): boolean {
    return this.M.codeItemValueNumber != null ? this.M.codeItemValueNumber : false;
  }

  get enableCache(): boolean {
    return this.M.enableCache != null ? this.M.enableCache : false;
  }

  get moduleInstCodeList(): boolean {
    return this.M.moduleInstCodeList != null ? this.M.moduleInstCodeList : false;
  }

  get subSysAsCloud(): boolean {
    return this.M.subSysAsCloud != null ? this.M.subSysAsCloud : false;
  }

  get subSysCodeList(): boolean {
    return this.M.subSysCodeList != null ? this.M.subSysCodeList : false;
  }

  get thresholdGroup(): boolean {
    return this.M.thresholdGroup != null ? this.M.thresholdGroup : false;
  }

  get userScope(): boolean {
    return this.M.userScope != null ? this.M.userScope : false;
  }

  get cls(): string {
    return 'PSAppCodeListImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'IPSModelSortable' || cls == 'app.codelist.IPSAppCodeList' || cls == 'codelist.IPSCodeList') return true;
    return super.instanceof(cls);
  }
}
